﻿<?xml version="1.0" encoding="utf-8" ?>
<Recipe xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
Name="SequentialWorkflowFeatureRecipe"
xmlns="http://schemas.microsoft.com/pag/gax-core"
Bound="false">
 <Caption>Add Sequential WorkflowFeature Feature</Caption>
  <HostData>
    <Icon File="spalm.ico" />
    <CommandBar Menu="SPALMWorkflows"/>
  </HostData>
    <Arguments>
      <Argument Name="SolutionDefaultNameSpace">
        <ValueProvider Type="SteriaMummert.SharePoint.SoftwareFactoryLite.ValueProviders.DefaultNamespaceProvider, SteriaMummert.SharePoint.SoftwareFactoryLite" />
      </Argument>
      <Argument Name="SolutionAssemblyName">
        <ValueProvider Type="SteriaMummert.SharePoint.SoftwareFactoryLite.ValueProviders.AssemblyProvider, SteriaMummert.SharePoint.SoftwareFactoryLite" />
      </Argument>
      <Argument Name="TargetFolder">
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="12\TEMPLATE\FEATURES\$(FeatureName)" />
      </Argument>
      <Argument Name="CurrentProject" Type="EnvDTE.Project, EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.FirstSelectedProject, Microsoft.Practices.RecipeFramework.Library" />
      </Argument>


      <Argument Name="TargetFeatureFile">
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="feature.xml">
        </ValueProvider>
      </Argument>
      <Argument Name="FeatureID">
        <ValueProvider Type="SteriaMummert.SharePoint.SoftwareFactoryLite.ValueProviders.GuidValueProvider, SteriaMummert.SharePoint.SoftwareFactoryLite" />
      </Argument>
      <Argument Name="FeatureName">
        <Converter Type="Microsoft.Practices.RecipeFramework.Library.Converters.NamespaceStringConverter, Microsoft.Practices.RecipeFramework.Library" />
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="WorkflowFeatureName" />
      </Argument>
      <Argument Name="FeatureTitle">
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="Workflow Feature Title" />
      </Argument>
      <Argument Name="FeatureDescription" Required="false">
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="Workflow Feature Description" />
      </Argument>
      <Argument Name="FeatureScope">
        <Converter Type="SteriaMummert.SharePoint.SoftwareFactoryLite.Converters.ScopeConverterWorkflow, SteriaMummert.SharePoint.SoftwareFactoryLite" />
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="Site" />
      </Argument>
      <Argument Name="FeatureHidden" Type="System.Boolean" />
      <Argument Name="FeatureVersion" Required="true">
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="1.0.0.0" />
      </Argument>
      
      <Argument Name="WorkflowID" Required="false">
        <ValueProvider Type="SteriaMummert.SharePoint.SoftwareFactoryLite.ValueProviders.GuidValueProvider, SteriaMummert.SharePoint.SoftwareFactoryLite" />
      </Argument>
      <Argument Name="WorkflowName" Required="false">
        <Converter Type="Microsoft.Practices.RecipeFramework.Library.Converters.NamespaceStringConverter, Microsoft.Practices.RecipeFramework.Library" />
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="WorkflowName" />
      </Argument>
      <Argument Name="WorkflowDescription" Required="false">
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="Workflow Feature Description" />
      </Argument>
      <Argument Name="WorkflowTaskContentTypeId" Type="SMC.SPALM.Types.NameValueItem, SteriaMummert.SharePoint.SoftwareFactoryLite" Required="true" >
        <ValueProvider Name="Task" Value="0x0108" Type="SteriaMummert.SharePoint.SoftwareFactoryLite.ValueProviders.DefaultNameValueItemProvider, SteriaMummert.SharePoint.SoftwareFactoryLite"  />
      </Argument>

      <Argument Name="FeatureCodeFolder">
        <ValueProvider Stage="OnBeforeActions" Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="CustomCode\$(WorkflowName)" />
      </Argument>
      <Argument Name="WorkflowCodeFileName">
        <ValueProvider Stage="OnBeforeActions" Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="$(WorkflowName).cs" />
      </Argument>
      <Argument Name="WorkflowDiagramFileName">
        <ValueProvider Stage="OnBeforeActions" Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="$(WorkflowName).designer.cs" />
      </Argument>
      <Argument Name="FeatureActivationDependencies" Required="false" Type="SMC.SPALM.Types.FeatureActivationDependency[], SteriaMummert.SharePoint.SoftwareFactoryLite" >
        <ValueProvider ObjectType="SMC.SPALM.Types.FeatureActivationDependency" Type="SteriaMummert.SharePoint.SoftwareFactoryLite.ValueProviders.DefaultCollectionProvider, SteriaMummert.SharePoint.SoftwareFactoryLite"  />
      </Argument>

      <Argument Name="Reference1">
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="System.Workflow.Activities" />
      </Argument>
      <Argument Name="Reference2">
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="microsoft.sharepoint.WorkflowActions" />
      </Argument>
      <Argument Name="Reference3">
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="System.Workflow.ComponentModel" />
      </Argument>
      <Argument Name="Reference4">
        <ValueProvider Type="Microsoft.Practices.RecipeFramework.Library.ValueProviders.ExpressionEvaluatorValueProvider,Microsoft.Practices.RecipeFramework.Library" Expression="System.Workflow.Runtime" />
      </Argument>
      
    </Arguments>
    <GatheringServiceData>
      <Wizard xmlns="http://schemas.microsoft.com/pag/gax-wizards" SchemaVersion="1.0">
        <Pages>
          <Page>
            <Title>Feature settings</Title>
            <Fields>
              <Field ValueName="FeatureID" Label="Feature ID" />
              <Field ValueName="FeatureName" Label="Name" />
              <Field ValueName="FeatureTitle" Label="Title" />
              <Field ValueName="FeatureDescription" Label="Description" />
              <Field ValueName="FeatureScope" Label="Scope" />
              <Field ValueName="FeatureVersion" Label="Version"></Field>
              <Field ValueName="FeatureActivationDependencies" Label="Activation Dependencies" >
                <Editor Type="SteriaMummert.SharePoint.SoftwareFactoryLite.Editors.CustomArrayEditor, SteriaMummert.SharePoint.SoftwareFactoryLite" />
              </Field>
              <Field ValueName="FeatureHidden" Label="Hidden"></Field>
            </Fields>
          </Page>
          <Page>
            <Title>Workflow Settings</Title>
            <Fields> 
              <Field ValueName="WorkflowID" Label="Workflow ID" />
              <Field ValueName="WorkflowName" Label="Workflow Name" />
              <Field ValueName="WorkflowDescription" Label="Workflow Description" />
              <Field ValueName="WorkflowTaskContentTypeId" Label="Workflow Task Content Type" >
                <Editor Type="SteriaMummert.SharePoint.SoftwareFactoryLite.Editors.SharePointConfigurationContentTypeEditor, SteriaMummert.SharePoint.SoftwareFactoryLite" />
              </Field>
            </Fields>
          </Page>
        </Pages>
      </Wizard>
    </GatheringServiceData>
    <Actions CoordinatorServiceType="Microsoft.Practices.RecipeFramework.Extensions.Coordinators.ConditionalCoordinator, Microsoft.Practices.RecipeFramework.Extensions">

      <Action Name="GenerateFeature" Template="Text\SequentialWorkflowFeature\feature.xml.t4" Type="Microsoft.Practices.RecipeFramework.VisualStudio.Library.Templates.TextTemplateAction, Microsoft.Practices.RecipeFramework.VisualStudio.Library" InputValue="Configured Static Value">
        <Input Name="FeatureTitle" RecipeArgument="FeatureTitle" />
        <Input Name="FeatureDescription" RecipeArgument="FeatureDescription" />
        <Input Name="FeatureID" RecipeArgument="FeatureID" />
        <Input Name="FeatureHidden" RecipeArgument="FeatureHidden" />
        <Input Name="FeatureVersion" RecipeArgument="FeatureVersion" /> 
        <Input Name="FeatureScope" RecipeArgument="FeatureScope" />
        <Input Name="FeatureActivationDependencies" RecipeArgument="FeatureActivationDependencies" />
         <Output Name="Content" />
      </Action>
      <Action Name="AddFeature" Type="SteriaMummert.SharePoint.SoftwareFactoryLite.Actions.AddItemToFolderFromStringAction, SteriaMummert.SharePoint.SoftwareFactoryLite" Open="false">
        <Input Name="Content" ActionOutput="GenerateFeature.Content" />
        <Input Name="TargetFileName" RecipeArgument="TargetFeatureFile" />
        <Input Name="Project" RecipeArgument="CurrentProject" />
        <Input Name="TargetFolder" RecipeArgument="TargetFolder" />
      </Action>

      <Action Name="GenerateElements" Template="Text\SequentialWorkflowFeature\elements.xml.t4" Type="Microsoft.Practices.RecipeFramework.VisualStudio.Library.Templates.TextTemplateAction, Microsoft.Practices.RecipeFramework.VisualStudio.Library" InputValue="Configured Static Value">
        <Input Name="WorkflowName" RecipeArgument="WorkflowName" />
        <Input Name="WorkflowDescription" RecipeArgument="WorkflowDescription" />
        <Input Name="WorkflowID" RecipeArgument="WorkflowID" />
        <Input Name="WorkflowNamespace" RecipeArgument="SolutionDefaultNameSpace" />
        <Input Name="WorkflowAssembly" RecipeArgument="SolutionAssemblyName" />
        <Input Name="WorkflowTaskContentTypeId" RecipeArgument="WorkflowTaskContentTypeId" />
        <Output Name="Content" />
      </Action>
      <Action Name="AddElements" Type="SteriaMummert.SharePoint.SoftwareFactoryLite.Actions.AddItemToFolderFromStringAction, SteriaMummert.SharePoint.SoftwareFactoryLite" Open="false" TargetFileName="elements.xml">
        <Input Name="Content" ActionOutput="GenerateElements.Content" />
        <Input Name="Project" RecipeArgument="CurrentProject" />
        <Input Name="TargetFolder" RecipeArgument="TargetFolder" />
      </Action>

      <Action Name="AddReference1" Type="Microsoft.Practices.RecipeFramework.Library.Solution.Actions.AddReferenceAction, Microsoft.Practices.RecipeFramework.Library">
        <Input Name="ReferringProject" RecipeArgument="CurrentProject" />
        <Input Name="ReferenceName"  RecipeArgument="Reference1" />
      </Action>
      <Action Name="AddReference2" Type="Microsoft.Practices.RecipeFramework.Library.Solution.Actions.AddReferenceAction, Microsoft.Practices.RecipeFramework.Library">
        <Input Name="ReferringProject" RecipeArgument="CurrentProject" />
        <Input Name="ReferenceName"  RecipeArgument="Reference2" />
      </Action>
      <Action Name="AddReference3" Type="Microsoft.Practices.RecipeFramework.Library.Solution.Actions.AddReferenceAction, Microsoft.Practices.RecipeFramework.Library">
        <Input Name="ReferringProject" RecipeArgument="CurrentProject" />
        <Input Name="ReferenceName"  RecipeArgument="Reference3" />
      </Action>
      <Action Name="AddReference4" Type="Microsoft.Practices.RecipeFramework.Library.Solution.Actions.AddReferenceAction, Microsoft.Practices.RecipeFramework.Library">
        <Input Name="ReferringProject" RecipeArgument="CurrentProject" />
        <Input Name="ReferenceName"  RecipeArgument="Reference4" />
      </Action>

      <Action Name="GenerateWorkflow" Template="Text\SequentialWorkflowFeature\SequentialWorkflow.cs.t4" Type="Microsoft.Practices.RecipeFramework.VisualStudio.Library.Templates.TextTemplateAction, Microsoft.Practices.RecipeFramework.VisualStudio.Library" InputValue="Configured Static Value">
        <Input Name="WorkflowName" RecipeArgument="WorkflowName" />
        <Input Name="WorkflowNamespace" RecipeArgument="SolutionDefaultNameSpace" />
        <Output Name="Content" />
      </Action>
      <Action Name="AddWorkflow" Type="SteriaMummert.SharePoint.SoftwareFactoryLite.Actions.AddItemToFolderFromStringAction, SteriaMummert.SharePoint.SoftwareFactoryLite" Open="true">
        <Input Name="Content" ActionOutput="GenerateWorkflow.Content" />
        <Input Name="TargetFileName" RecipeArgument="WorkflowCodeFileName" />
        <Input Name="Project" RecipeArgument="CurrentProject" />
        <Input Name="TargetFolder" RecipeArgument="FeatureCodeFolder" />
      </Action>
      
      <Action Name="GenerateWorkflowDiagram" Template="Text\SequentialWorkflowFeature\SequentialWorkflow.designer.cs.t4" Type="Microsoft.Practices.RecipeFramework.VisualStudio.Library.Templates.TextTemplateAction, Microsoft.Practices.RecipeFramework.VisualStudio.Library" InputValue="Configured Static Value">
        <Input Name="WorkflowName" RecipeArgument="WorkflowName" />
        <Input Name="WorkflowNamespace" RecipeArgument="SolutionDefaultNameSpace" />
        <Output Name="Content" />
      </Action>
      <Action Name="AddDiagram" Type="SteriaMummert.SharePoint.SoftwareFactoryLite.Actions.AddItemToFolderFromStringAction, SteriaMummert.SharePoint.SoftwareFactoryLite" Open="false">
        <Input Name="Content" ActionOutput="GenerateWorkflowDiagram.Content" />
        <Input Name="TargetFileName" RecipeArgument="WorkflowDiagramFileName" />
        <Input Name="Project" RecipeArgument="CurrentProject" />
        <Input Name="TargetFolder" RecipeArgument="FeatureCodeFolder" />
      </Action>    

  </Actions>
</Recipe>